﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace WebApplication1.DDD.Code
{
    public class Check
    {
        static T CastByExample<T>(object obj, Func<T> example)
        {
            return (T)obj;
        }
        public T Views<T>(Func<T,string> ext)
        {
            return "";
        }
        static void f(object p)
        {
            var person = CastByExample(p, () => new { Name = "", Age = 0 });
            Console.WriteLine("Name={0},Age={1}", person.Name, person.Age);
            var person = CastByExample(p, () => new { Name = "", Age = 0 });
        }

    }
}